(function(){
    let qr = getUrlParams(location.href)
    console.log(qr.productid);
    $.ajax({url:`http://chst.vip:1234/api/getdiscountproduct?productid=${qr.productid}`})
    .then(res=>{
        let newData = [...res.result]
        console.log(newData);
        let page = ''
        let html = ''
        newData.forEach(item=>{
            page+=`
            <div class="title">
                <h4>${item.productName}</h4>
            </div>
            <div class="other">
                <span class="mall fl">${item.productFrom} | ${item.productTime}</span>
                <i>${item.productTips}</i>
                <div>${item.productPrice}</div>
            </div>
            <div class="container">
                <div class="info2">
                    ${item.productInfo}
                </div>
                <p>
                    ${item.productImg}
                </p>
            </div>
            `
            html+=`
            ${item.productComment}
            `
        })
        $('.infoR').html(page)
        $('.comment').html(html)
    })
})()